package com.payment.ktb.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by admin on 2017/12/4.
 */

public class FragmentAdapterAgentManage extends FragmentPagerAdapter {

    private List<Fragment> mFragments;
    private List<String> tabTitles;



    public FragmentAdapterAgentManage(FragmentManager fm,List<Fragment> fragments,List<String> tabTitles) {
        super(fm);
        mFragments=fragments;
        this.tabTitles = tabTitles;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabTitles.get(position);
    }
}
